#include "diphead5-1.h"
int main()
{
    char s[] = "dipsource.bmp";
    BmpImage img(s);
    //添加椒盐噪声
    img.addSalt(500);
    char str[] = "salted.bmp";
    BmpImage salt(str);
    double src = salt.calContrast();
    salt.rgba();
    //均值滤波
    salt.meanFilter();
    double mf = salt.calContrast();
    salt.rgba();
    //中值滤波
    salt.medianFilter();
    double mdf = salt.calContrast();
    salt.rgba();
    //加权均值滤波
    salt.weightedmeanFilter();
    double wmf = salt.calContrast();
    salt.rgba();
    printf("Constrast of Source image : %f\n", src);
    printf("Constrast of meanfilter image : %f\n", mf);
    printf("Constrast of medianfilter image : %f\n", mdf);
    printf("Constrast of weightedmeanfilter image : %f\n", wmf);
}